﻿using ContactSMS.Client.Models;

namespace ContactSMS.Client.Views.Templates
{
    public class MessageDataTemplateSelector : DataTemplateSelector
    {
        public DataTemplate SenderMessageTemplate { get; set; }
        public DataTemplate ReceiverMessageTemplate { get; set; }

        protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
        {
            //var message = (MessageDetailModel)item;

            //if (message.UserId == 0)
            //return ReceiverMessageTemplate;

            return SenderMessageTemplate;
        }
    }
}
